Integrand size = 33, antiderivative size = 245 \[ \int \frac {(a+b \sec (c+d x))^3 (A+B \sec (c+d x))}{\sec ^{\frac {7}{2}}(c+d x)} \, dx=\frac {2 \left (9 a^2 A b+5 A b^3+3 a^3 B+15 a b^2 B\right ) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{5 d}+\frac {2 \left (5 a^3 A+21 a A b^2+21 a^2 b B+21 b^3 B\right ) \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{21 d}+\frac {2 a^2 (11 A b+7 a B) \sin (c+d x)}{35 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {2 a \left (5 a^2 A+18 A b^2+21 a b B\right ) \sin (c+d x)}{21 d \sqrt {\sec (c+d x)}}+\frac {2 a A (a+b \sec (c+d x))^2 \sin (c+d x)}{7 d \sec ^{\frac {5}{2}}(c+d x)} \]
[Out]
Time = 0.49 (sec) , antiderivative size = 245, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.212, Rules used = {4110, 4159, 4132, 3856, 2719, 4130, 2720} \[ \int \frac {(a+b \sec (c+d x))^3 (A+B \sec (c+d x))}{\sec ^{\frac {7}{2}}(c+d x)} \, dx=\frac {2 a \left (5 a^2 A+21 a b B+18 A b^2\right ) \sin (c+d x)}{21 d \sqrt {\sec (c+d x)}}+\frac {2 a^2 (7 a B+11 A b) \sin (c+d x)}{35 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {2 \left (5 a^3 A+21 a^2 b B+21 a A b^2+21 b^3 B\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{21 d}+\frac {2 \left (3 a^3 B+9 a^2 A b+15 a b^2 B+5 A b^3\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}+\frac {2 a A \sin (c+d x) (a+b \sec (c+d x))^2}{7 d \sec ^{\frac {5}{2}}(c+d x)} \]
[In]
[Out]
Rule 2719
Rule 2720
Rule 3856
Rule 4110
Rule 4130
Rule 4132
Rule 4159
Rubi steps \begin{align*} \text {integral}& = \frac {2 a A (a+b \sec (c+d x))^2 \sin (c+d x)}{7 d \sec ^{\frac {5}{2}}(c+d x)}-\frac {2}{7} \int \frac {(a+b \sec (c+d x)) \left (-\frac {1}{2} a (11 A b+7 a B)-\frac {1}{2} \left (5 a^2 A+7 A b^2+14 a b B\right ) \sec (c+d x)-\frac {1}{2} b (a A+7 b B) \sec ^2(c+d x)\right )}{\sec ^{\frac {5}{2}}(c+d x)} \, dx \\ & = \frac {2 a^2 (11 A b+7 a B) \sin (c+d x)}{35 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {2 a A (a+b \sec (c+d x))^2 \sin (c+d x)}{7 d \sec ^{\frac {5}{2}}(c+d x)}+\frac {4}{35} \int \frac {\frac {5}{4} a \left (5 a^2 A+18 A b^2+21 a b B\right )+\frac {7}{4} \left (9 a^2 A b+5 A b^3+3 a^3 B+15 a b^2 B\right ) \sec (c+d x)+\frac {5}{4} b^2 (a A+7 b B) \sec ^2(c+d x)}{\sec ^{\frac {3}{2}}(c+d x)} \, dx \\ & = \frac {2 a^2 (11 A b+7 a B) \sin (c+d x)}{35 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {2 a A (a+b \sec (c+d x))^2 \sin (c+d x)}{7 d \sec ^{\frac {5}{2}}(c+d x)}+\frac {4}{35} \int \frac {\frac {5}{4} a \left (5 a^2 A+18 A b^2+21 a b B\right )+\frac {5}{4} b^2 (a A+7 b B) \sec ^2(c+d x)}{\sec ^{\frac {3}{2}}(c+d x)} \, dx+\frac {1}{5} \left (9 a^2 A b+5 A b^3+3 a^3 B+15 a b^2 B\right ) \int \frac {1}{\sqrt {\sec (c+d x)}} \, dx \\ & = \frac {2 a^2 (11 A b+7 a B) \sin (c+d x)}{35 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {2 a \left (5 a^2 A+18 A b^2+21 a b B\right ) \sin (c+d x)}{21 d \sqrt {\sec (c+d x)}}+\frac {2 a A (a+b \sec (c+d x))^2 \sin (c+d x)}{7 d \sec ^{\frac {5}{2}}(c+d x)}+\frac {1}{21} \left (5 a^3 A+21 a A b^2+21 a^2 b B+21 b^3 B\right ) \int \sqrt {\sec (c+d x)} \, dx+\frac {1}{5} \left (\left (9 a^2 A b+5 A b^3+3 a^3 B+15 a b^2 B\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx \\ & = \frac {2 \left (9 a^2 A b+5 A b^3+3 a^3 B+15 a b^2 B\right ) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{5 d}+\frac {2 a^2 (11 A b+7 a B) \sin (c+d x)}{35 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {2 a \left (5 a^2 A+18 A b^2+21 a b B\right ) \sin (c+d x)}{21 d \sqrt {\sec (c+d x)}}+\frac {2 a A (a+b \sec (c+d x))^2 \sin (c+d x)}{7 d \sec ^{\frac {5}{2}}(c+d x)}+\frac {1}{21} \left (\left (5 a^3 A+21 a A b^2+21 a^2 b B+21 b^3 B\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx \\ & = \frac {2 \left (9 a^2 A b+5 A b^3+3 a^3 B+15 a b^2 B\right ) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{5 d}+\frac {2 \left (5 a^3 A+21 a A b^2+21 a^2 b B+21 b^3 B\right ) \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{21 d}+\frac {2 a^2 (11 A b+7 a B) \sin (c+d x)}{35 d \sec ^{\frac {3}{2}}(c+d x)}+\frac {2 a \left (5 a^2 A+18 A b^2+21 a b B\right ) \sin (c+d x)}{21 d \sqrt {\sec (c+d x)}}+\frac {2 a A (a+b \sec (c+d x))^2 \sin (c+d x)}{7 d \sec ^{\frac {5}{2}}(c+d x)} \\ \end{align*}
Time = 16.04 (sec) , antiderivative size = 180, normalized size of antiderivative = 0.73 \[ \int \frac {(a+b \sec (c+d x))^3 (A+B \sec (c+d x))}{\sec ^{\frac {7}{2}}(c+d x)} \, dx=\frac {\sqrt {\sec (c+d x)} \left (84 \left (9 a^2 A b+5 A b^3+3 a^3 B+15 a b^2 B\right ) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+20 \left (5 a^3 A+21 a A b^2+21 a^2 b B+21 b^3 B\right ) \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )+a \left (42 a (3 A b+a B) \cos (c+d x)+5 \left (13 a^2 A+42 A b^2+42 a b B+3 a^2 A \cos (2 (c+d x))\right )\right ) \sin (2 (c+d x))\right )}{210 d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(663\) vs. \(2(273)=546\).
Time = 28.31 (sec) , antiderivative size = 664, normalized size of antiderivative = 2.71
method | result | size |
default | \(-\frac {2 \sqrt {\left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \left (240 a^{3} A \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\left (-360 a^{3} A -504 A \,a^{2} b -168 B \,a^{3}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{6} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (280 a^{3} A +504 A \,a^{2} b +420 A a \,b^{2}+168 B \,a^{3}+420 B \,a^{2} b \right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (-80 a^{3} A -126 A \,a^{2} b -210 A a \,b^{2}-42 B \,a^{3}-210 B \,a^{2} b \right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+25 A \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) a^{3}+105 A \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) a \,b^{2}-189 A \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) a^{2} b -105 A \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) b^{3}+105 B \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) a^{2} b +105 B \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) b^{3}-63 B \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) a^{3}-315 B \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) a \,b^{2}\right )}{105 \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, d}\) | \(664\) |
parts | \(\text {Expression too large to display}\) | \(892\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.13 (sec) , antiderivative size = 295, normalized size of antiderivative = 1.20 \[ \int \frac {(a+b \sec (c+d x))^3 (A+B \sec (c+d x))}{\sec ^{\frac {7}{2}}(c+d x)} \, dx=-\frac {5 \, \sqrt {2} {\left (5 i \, A a^{3} + 21 i \, B a^{2} b + 21 i \, A a b^{2} + 21 i \, B b^{3}\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + 5 \, \sqrt {2} {\left (-5 i \, A a^{3} - 21 i \, B a^{2} b - 21 i \, A a b^{2} - 21 i \, B b^{3}\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + 21 \, \sqrt {2} {\left (-3 i \, B a^{3} - 9 i \, A a^{2} b - 15 i \, B a b^{2} - 5 i \, A b^{3}\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + 21 \, \sqrt {2} {\left (3 i \, B a^{3} + 9 i \, A a^{2} b + 15 i \, B a b^{2} + 5 i \, A b^{3}\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) - \frac {2 \, {\left (15 \, A a^{3} \cos \left (d x + c\right )^{3} + 21 \, {\left (B a^{3} + 3 \, A a^{2} b\right )} \cos \left (d x + c\right )^{2} + 5 \, {\left (5 \, A a^{3} + 21 \, B a^{2} b + 21 \, A a b^{2}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{105 \, d} \]
[In]
[Out]
\[ \int \frac {(a+b \sec (c+d x))^3 (A+B \sec (c+d x))}{\sec ^{\frac {7}{2}}(c+d x)} \, dx=\int \frac {\left (A + B \sec {\left (c + d x \right )}\right ) \left (a + b \sec {\left (c + d x \right )}\right )^{3}}{\sec ^{\frac {7}{2}}{\left (c + d x \right )}}\, dx \]
[In]
[Out]
\[ \int \frac {(a+b \sec (c+d x))^3 (A+B \sec (c+d x))}{\sec ^{\frac {7}{2}}(c+d x)} \, dx=\int { \frac {{\left (B \sec \left (d x + c\right ) + A\right )} {\left (b \sec \left (d x + c\right ) + a\right )}^{3}}{\sec \left (d x + c\right )^{\frac {7}{2}}} \,d x } \]
[In]
[Out]
\[ \int \frac {(a+b \sec (c+d x))^3 (A+B \sec (c+d x))}{\sec ^{\frac {7}{2}}(c+d x)} \, dx=\int { \frac {{\left (B \sec \left (d x + c\right ) + A\right )} {\left (b \sec \left (d x + c\right ) + a\right )}^{3}}{\sec \left (d x + c\right )^{\frac {7}{2}}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(a+b \sec (c+d x))^3 (A+B \sec (c+d x))}{\sec ^{\frac {7}{2}}(c+d x)} \, dx=\int \frac {\left (A+\frac {B}{\cos \left (c+d\,x\right )}\right )\,{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^3}{{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{7/2}} \,d x \]
[In]
[Out]